import request from '@/utils/request'


//  查询抽查列表
export function querySpotCheckList(params) {
  return request({
    url: '/business/defect/defectSpotCheck/querySpotCheckList',
    method: 'get',
    params
  })
}

//  获取抽查详情
export function getSpotCheckInfo(params) {
  return request({
    url: '/business/defect/defectSpotCheck/getSpotCheckInfo',
    method: 'get',
    params
  })
}

//  增加抽查
export function addSpotCheck(data) {
  return request({
    url: '/business/defect/defectSpotCheck/addSpotCheck',
    method: 'post',
    data
  })
}

//  修改抽查
export function updateSpotCheck(data) {
  return request({
    url: '/business/defect/defectSpotCheck/updateSpotCheck',
    method: 'put',
    data
  })
}

// 删除检查
export function delDefectInspect(params) {
  return request({
    url: `/business/defect/defectSpotCheck/deleteSpotCheck`,
    method: 'delete',
    params
  })
}

//  抽查隐患列表
export function defectSpotCheckQuestionQueryQuestion(params) {
  return request({
    url: '/business/defect/defectSpotCheckQuestion/queryQuestion',
    method: 'get',
    params
  })
}

//  增加抽查隐患
export function defectSpotCheckQuestionAddQuestion(data) {
  return request({
    url: '/business/defect/defectSpotCheckQuestion/addQuestion',
    method: 'post',
    data
  })
}

//  修改抽查隐患
export function defectSpotCheckQuestionUpdateQuestion(data) {
  return request({
    url: '/business/defect/defectSpotCheckQuestion/updateQuestion',
    method: 'put',
    data
  })
}

// 删除抽查隐患
export function defectSpotCheckQuestionRemoveQuestion(params) {
  return request({
    url: `/business/defect/defectSpotCheckQuestion/removeQuestion`,
    method: 'delete',
    params
  })
}
